/*
 Navicat Premium Data Transfer

 Source Server         : 校园新鲜事
 Source Server Type    : MySQL
 Source Server Version : 50736
 Source Host           : 47.100.106.117:3306
 Source Schema         : school

 Target Server Type    : MySQL
 Target Server Version : 50736
 File Encoding         : 65001

 Date: 09/12/2021 10:44:30
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
  `admin_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '管理员自增id',
  `gender` int(11) DEFAULT NULL COMMENT '性别',
  `admin_name` varchar(255) NOT NULL COMMENT '用户名',
  `password` varchar(255) NOT NULL COMMENT '密码',
  `head_portrait` varchar(255) DEFAULT NULL COMMENT '头像url',
  `signature` varchar(255) DEFAULT NULL COMMENT '个人签名',
  `version` int(11) DEFAULT '0' COMMENT '乐观锁',
  `deleted` bit(1) DEFAULT b'0' COMMENT '逻辑删除',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`admin_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of admin
-- ----------------------------
BEGIN;
INSERT INTO `admin` VALUES (1, 1, 'admin', 'admin', NULL, '拥有至高无上权利的顶级管理员', 0, b'0', '2021-09-30 13:43:04', '2021-09-30 17:54:42');
INSERT INTO `admin` VALUES (2, 1, 'lqcheng', 'password', NULL, NULL, 0, b'1', '2021-09-30 17:51:21', '2021-09-30 17:51:21');
COMMIT;

-- ----------------------------
-- Table structure for build
-- ----------------------------
DROP TABLE IF EXISTS `build`;
CREATE TABLE `build` (
  `build_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '地点自增id',
  `x_position` decimal(10,6) NOT NULL COMMENT '地点纬度',
  `y_position` decimal(10,6) NOT NULL COMMENT '地点经度',
  `build_name` varchar(255) NOT NULL COMMENT '地点名称',
  `build_icon` varchar(255) DEFAULT NULL COMMENT '地点显示图标',
  `invi_id` int(11) DEFAULT '0' COMMENT '最新帖子id',
  `invi_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '帖子数量',
  `version` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁',
  `deleted` bit(1) DEFAULT b'0' COMMENT '逻辑删除',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`build_id`) USING BTREE,
  KEY `BI` (`invi_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of build
-- ----------------------------
BEGIN;
INSERT INTO `build` VALUES (1, 150.000000, 300.000000, '学校', 'sada', 1, 9, 0, b'0', '2021-11-08 11:10:13', '2021-11-08 11:10:17');
INSERT INTO `build` VALUES (2, 75.000000, 120.000000, '家', '发的广泛地', 2, 12, 0, b'0', '2021-11-08 11:11:34', '2021-11-08 11:11:37');
INSERT INTO `build` VALUES (3, 150.000000, 300.000000, '学校', 'sada', 52, 10, 0, b'0', '2021-12-08 21:01:04', '2021-12-08 21:01:04');
COMMIT;

-- ----------------------------
-- Table structure for comment_agree
-- ----------------------------
DROP TABLE IF EXISTS `comment_agree`;
CREATE TABLE `comment_agree` (
  `commetager_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '点赞评论表',
  `first_id` int(11) DEFAULT NULL COMMENT '点赞一级评论Id',
  `second_id` int(11) DEFAULT NULL COMMENT '点赞二级评论Id',
  `user_id` int(11) DEFAULT NULL COMMENT '点赞用户',
  `invi_id` int(11) NOT NULL COMMENT '帖子Id',
  `version` int(11) DEFAULT '0' COMMENT '乐观锁',
  `deleted` bit(1) DEFAULT b'0' COMMENT '逻辑删除',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`commetager_id`) USING BTREE,
  KEY `CF` (`first_id`) USING BTREE,
  KEY `CS` (`second_id`) USING BTREE,
  KEY `CU` (`user_id`) USING BTREE,
  KEY `CI` (`invi_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of comment_agree
-- ----------------------------
BEGIN;
INSERT INTO `comment_agree` VALUES (1, 1, NULL, 1, 1, 0, b'0', '2021-10-12 21:19:17', '2021-10-12 21:19:21');
INSERT INTO `comment_agree` VALUES (2, NULL, 1, 2, 1, 0, b'0', '2021-10-12 21:19:52', '2021-10-12 21:19:56');
COMMIT;

-- ----------------------------
-- Table structure for first_comment
-- ----------------------------
DROP TABLE IF EXISTS `first_comment`;
CREATE TABLE `first_comment` (
  `first_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '一级评论自增id',
  `com_content` varchar(255) NOT NULL COMMENT '评论内容',
  `user_id` int(11) DEFAULT NULL COMMENT '用户id',
  `invi_id` int(11) NOT NULL COMMENT '评论的帖子id',
  `agree_num` int(11) NOT NULL DEFAULT '0' COMMENT '评论点赞数',
  `version` int(11) DEFAULT '0' COMMENT '乐观锁',
  `deleted` bit(1) DEFAULT b'0' COMMENT '逻辑删除',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`first_id`) USING BTREE,
  KEY `FU` (`user_id`) USING BTREE,
  KEY `FI` (`invi_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of first_comment
-- ----------------------------
BEGIN;
INSERT INTO `first_comment` VALUES (1, '还有谁', 1, 1, 1, 0, b'0', '2021-10-01 11:46:55', '2021-10-01 11:47:00');
COMMIT;

-- ----------------------------
-- Table structure for invitation
-- ----------------------------
DROP TABLE IF EXISTS `invitation`;
CREATE TABLE `invitation` (
  `invi_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '帖子自增id',
  `invi_title` varchar(255) NOT NULL COMMENT '帖子标题',
  `invi_content` varchar(255) NOT NULL COMMENT '帖子内容',
  `invi_pic` longtext COMMENT '帖子图片url',
  `agree_num` int(11) NOT NULL DEFAULT '0' COMMENT '点赞数量',
  `comment_num` int(11) NOT NULL DEFAULT '0' COMMENT '评论数量',
  `browse_num` int(11) NOT NULL DEFAULT '0' COMMENT '浏览量',
  `topic_list` varchar(255) DEFAULT NULL COMMENT '话题id集合',
  `user_id` int(11) NOT NULL COMMENT '用户id',
  `build_id` int(11) DEFAULT NULL COMMENT '发布地点id',
  `version` int(11) DEFAULT '0' COMMENT '乐观锁',
  `deleted` bit(1) DEFAULT b'0' COMMENT '逻辑删除',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  `file_date` bigint(20) DEFAULT NULL COMMENT '文件夹创建时间',
  PRIMARY KEY (`invi_id`) USING BTREE,
  KEY `IU` (`user_id`) USING BTREE,
  KEY `IB` (`build_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of invitation
-- ----------------------------
BEGIN;
INSERT INTO `invitation` VALUES (1, 'dd', 'dpoiyms', 'dasdasda', 22, 1, 1, '1,', 1, 1, 0, b'1', '2021-10-01 11:44:15', '2021-10-15 20:19:58', 1634219619988);
INSERT INTO `invitation` VALUES (2, 'hhahhahah', 'hsgafhjkshdkjhas', 'sadsads,', 0, 0, 0, '1,2,3,', 1, 2, 0, b'0', '2021-10-11 21:11:55', '2021-10-11 21:11:55', NULL);
INSERT INTO `invitation` VALUES (3, 'asdasdsadsa', 'adsdsadsadsads', 'asdasd,', 1, 5, 20, '1,', 1, 1, 0, b'0', '2021-10-11 21:18:08', '2021-10-13 19:27:03', NULL);
INSERT INTO `invitation` VALUES (28, 'test', 'test', 'http://112.74.160.55:8985/schoolnews/img/2021101611565102821720-2dfc-44d2-a8a9-1ea9fcd46ccf.jpg,', 99, 1, 999, '1,', 1, 1, 1, b'0', '2021-10-14 21:46:35', '2021-10-16 11:56:52', 1634356611582);
INSERT INTO `invitation` VALUES (32, 'dd', 'dpoiyms', 'http://112.74.160.55:8985/schoolnews/img/20211014214657cc4cdd08-1d04-4871-8af0-1280d1e26d4b.jpeg,http://112.74.160.55:8985/schoolnews/img/202110142146577c7cc9f6-45f3-4409-be00-01720413e014.jpeg,http://112.74.160.55:8985/schoolnews/img/202110142146571b14e073-2f8e-4e73-9fc5-8ee1c172cf74.jpeg', 22, 1, 1, '1,', 1, 1, 0, b'0', '2021-10-15 20:21:36', '2021-10-15 20:21:36', 1634219619988);
INSERT INTO `invitation` VALUES (33, 'sswwggddddddddd', 'ddddddddddddaaaaaaa', 'http://112.74.160.55:8985/schoolnews/img/20211014214657cc4cdd08-1d04-4871-8af0-1280d1e26d4b.jpeg,http://112.74.160.55:8985/schoolnews/img/202110142146577c7cc9f6-45f3-4409-be00-01720413e014.jpeg,http://112.74.160.55:8985/schoolnews/img/202110142146571b14e073-2f8e-4e73-9fc5-8ee1c172cf74.jpeg', 999, 1, 666, '1,', 2, 1, 0, b'0', '2021-10-15 20:28:10', '2021-10-15 21:19:10', 1634219619988);
INSERT INTO `invitation` VALUES (34, 'dd', 'dpoiyms', 'http://112.74.160.55:8985/schoolnews/img/20211014214657cc4cdd08-1d04-4871-8af0-1280d1e26d4b.jpeg,http://112.74.160.55:8985/schoolnews/img/202110142146577c7cc9f6-45f3-4409-be00-01720413e014.jpeg,http://112.74.160.55:8985/schoolnews/img/202110142146571b14e073-2f8e-4e73-9fc5-8ee1c172cf74.jpeg', 99, 1, 999, '1,', 2, 1, 0, b'0', '2021-10-15 20:38:57', '2021-10-15 20:38:57', 1634300889883);
INSERT INTO `invitation` VALUES (35, 'dd', 'dpoiyms', 'adasda,', 99, 1, 996, '1,', 2, 1, 0, b'0', '2021-10-15 20:40:36', '2021-10-15 20:40:36', 1634300889883);
INSERT INTO `invitation` VALUES (38, '随便', '按时地方当局不符合', 'http://112.74.160.55:8985/schoolnews/img/202110160810382f912c00-976d-44f7-896a-3a281c87b183.jpeg,http://112.74.160.55:8985/schoolnews/img/20211016081038b55daeaa-9def-455f-8984-e86302fd4f1b.jpeg,http://112.74.160.55:8985/schoolnews/img/20211016081038623ef109-2b9d-44ab-8124-a7a6a3f57c17.jpeg', 0, 0, 0, '1,', 1, 2, 0, b'1', '2021-10-16 08:10:38', '2021-10-16 08:10:38', 1634343038396);
INSERT INTO `invitation` VALUES (39, '还有谁', '爱仕达大开杀戒垃圾', NULL, 0, 0, 0, NULL, 1, 2, 0, b'0', '2021-10-16 09:41:45', '2021-10-16 09:41:48', NULL);
INSERT INTO `invitation` VALUES (40, 'ahsdb', 'asfdvgfhj', NULL, 0, 0, 0, '1,2,3', 1, 1, 0, b'0', '2021-10-16 09:55:48', '2021-10-16 09:55:48', NULL);
INSERT INTO `invitation` VALUES (41, 'ahsdb', 'asfdvgfhj', NULL, 0, 0, 0, '1,2,3,', 1, 1, 0, b'0', '2021-10-16 09:58:00', '2021-10-16 09:58:00', NULL);
INSERT INTO `invitation` VALUES (42, '随便', '按时地方当局不符合', 'http://112.74.160.55:8985/schoolnews/img/202110161003180e628a34-8875-4c7a-9110-aad6c59dab0d.jpeg,http://112.74.160.55:8985/schoolnews/img/2021101610031881936ea3-d54f-42ab-93d1-e265329a1aa8.jpeg,http://112.74.160.55:8985/schoolnews/img/20211016100318e060dee6-69ce-45c5-8418-23abc1cfd587.jpeg,', 0, 0, 0, NULL, 1, 2, 0, b'0', '2021-10-16 10:03:18', '2021-10-16 10:03:18', 1634349798383);
INSERT INTO `invitation` VALUES (43, '随便', '按时地方当局不符合', 'http://112.74.160.55:8985/schoolnews/img/20211016101932bcd12416-b2ae-48ba-a06c-aced8340e8ff.,', 0, 0, 0, NULL, 1, 2, 0, b'0', '2021-10-16 10:19:32', '2021-10-16 10:19:32', 1634350772231);
INSERT INTO `invitation` VALUES (44, 'test', 'test', 'http://112.74.160.55:8985/schoolnews/img/20211016151902e21ef833-293c-4232-abaf-b579e61a9772.png,http://112.74.160.55:8985/schoolnews/img/202110161519026320978c-98c0-435c-ae50-7093e2d9b764.png,http://112.74.160.55:8985/schoolnews/img/202110161519025ff3eb39-3490-4ae9-878a-ab1281c3bdb2.png,', 0, 0, 0, NULL, 1, 2, 0, b'0', '2021-10-16 10:27:14', '2021-10-16 15:19:03', 1634368742800);
INSERT INTO `invitation` VALUES (45, '随便', '按时地方当局不符合', NULL, 0, 0, 0, NULL, 1, 2, 0, b'0', '2021-10-16 10:28:40', '2021-10-16 10:28:40', NULL);
INSERT INTO `invitation` VALUES (46, '随便', '按时地方当局不符合', NULL, 0, 0, 0, NULL, 1, 2, 0, b'0', '2021-10-16 10:29:06', '2021-10-16 10:29:06', NULL);
INSERT INTO `invitation` VALUES (47, '随便', '按时地方当局不符合', 'http://112.74.160.55:8985/schoolnews/img/202110161032170cefd964-2578-4ff5-8af2-a5d75a3864ea.,', 0, 0, 0, NULL, 1, 2, 0, b'0', '2021-10-16 10:32:17', '2021-10-16 10:32:17', 1634351537013);
INSERT INTO `invitation` VALUES (48, '随便', '按时地方当局不符合', 'http://112.74.160.55:8985/schoolnews/img/20211016103343a918a02a-4555-4856-9ffa-482f475f82a2.,', 0, 0, 0, NULL, 1, 2, 0, b'0', '2021-10-16 10:33:43', '2021-10-16 10:33:43', 1634351623032);
INSERT INTO `invitation` VALUES (49, '随便', '按时地方当局不符合', NULL, 0, 0, 0, NULL, 1, 2, 0, b'0', '2021-10-16 10:33:49', '2021-10-16 10:33:49', NULL);
INSERT INTO `invitation` VALUES (50, '随便', '按时地方当局不符合', 'http://112.74.160.55:8985/schoolnews/img/202110161051541ad3bd26-f329-47e8-b674-c131fe9cf1be.,', 0, 0, 0, NULL, 1, 2, 0, b'0', '2021-10-16 10:51:54', '2021-10-16 10:51:54', 1634352714348);
INSERT INTO `invitation` VALUES (51, '天气', '今天天气真不错哦', 'http://imgs/1,http://imgs/2', 0, 0, 0, NULL, 1, NULL, 0, b'0', '2021-12-08 21:00:39', '2021-12-08 21:00:39', NULL);
INSERT INTO `invitation` VALUES (52, '天气', '今天天气真不错哦', 'http://imgs/1,http://imgs/2', 0, 0, 0, NULL, 1, 1, 0, b'0', '2021-12-08 21:01:04', '2021-12-08 21:01:04', NULL);
COMMIT;

-- ----------------------------
-- Table structure for school_user
-- ----------------------------
DROP TABLE IF EXISTS `school_user`;
CREATE TABLE `school_user` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户自增id',
  `open_id` varchar(255) NOT NULL COMMENT '微信标识id',
  `gender` int(11) NOT NULL COMMENT '性别',
  `nickname` varchar(255) NOT NULL COMMENT '用户名',
  `birthday` varchar(255) DEFAULT NULL COMMENT '生日',
  `city` varchar(255) DEFAULT NULL COMMENT '城市',
  `head_portrait` longtext NOT NULL COMMENT '头像url',
  `signature` varchar(255) NOT NULL COMMENT '个人签名',
  `invitation_number` int(11) NOT NULL DEFAULT '0' COMMENT '发布帖子数量',
  `ban_time` int(11) DEFAULT '0' COMMENT '禁止时长以小时为单位',
  `ban_day` int(11) DEFAULT '0' COMMENT '禁止时长以天数为单位',
  `version` int(11) DEFAULT '1' COMMENT '乐观锁',
  `deleted` bit(1) DEFAULT b'0' COMMENT '逻辑删除',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of school_user
-- ----------------------------
BEGIN;
INSERT INTO `school_user` VALUES (1, 'dfghggfdsdfghj', 1, '的舒服舒服', 'dfd', '北京', 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic2.zhimg.com%2F50%2Fv2-768b2766598b6c1a1366c8a2dd9691c2_hd.jpg&refer=http%3A%2F%2Fpic2.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1641609571&t=bee2d38041d67dde3926a1ca4c1e221f', '对方水电费第三方', 1, 0, 0, 1, b'0', '2021-10-01 11:42:34', '2021-10-13 20:52:52');
INSERT INTO `school_user` VALUES (2, 'lqcheng', 1, '水电费方方达', '阿斯顿撒', '南京', 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fp5.gexing.com%2FGSF%2Ftouxiang%2F20200705%2F07%2F52jc60nt419pcjaempgxemezm.jpg%40%21200x200_3%3Frecache%3D20131108&refer=http%3A%2F%2Fp5.gexing.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1641609571&t=62eec761eb9eeadd0cfa9274ec2cb109', '未亡人', 0, 0, 0, 0, b'0', '2021-10-01 11:48:10', '2021-10-01 11:48:19');
INSERT INTO `school_user` VALUES (9, '1213', 1, '', '', '赣州', 'https://img0.baidu.com/it/u=154280326,4258782419&fm=26&fmt=auto', '这个人好懒，什么也没留下', 0, 0, 0, 1, b'1', '2021-10-19 11:44:52', '2021-10-19 11:44:52');
INSERT INTO `school_user` VALUES (10, '1232', 1, '鱼香肉丝没有鱼', '', '赣州', 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimage.biaobaiju.com%2Fuploads%2F20180802%2F01%2F1533143046-IDiXyEtckL.jpg&refer=http%3A%2F%2Fimage.biaobaiju.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1641609620&t=8540b82aa0f72941cc3f6d274c01d266', '这个好懒，什么也没留下', 0, 0, 0, 1, b'0', '2021-10-19 11:46:45', '2021-10-19 11:46:45');
INSERT INTO `school_user` VALUES (11, '12321', 0, 'test', '', '南昌', 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fp5.gexing.com%2FGSF%2Ftouxiang%2F20200726%2F22%2F5adffea3b71052806e78963cc35a355b.jpg%40%21200x200_3%3Frecache%3D20131108&refer=http%3A%2F%2Fp5.gexing.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1641609666&t=f0417c97145c2509d5aca51e77f9a1ea', 'test', 0, 0, 0, 1, b'0', '2021-10-19 14:43:12', '2021-10-21 14:43:12');
INSERT INTO `school_user` VALUES (12, '12324', 1, 'test2', '', '武汉', 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimage.biaobaiju.com%2Fuploads%2F20180802%2F01%2F1533143046-IDiXyEtckL.jpg&refer=http%3A%2F%2Fimage.biaobaiju.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1641609620&t=8540b82aa0f72941cc3f6d274c01d266', '你好', -1, -1, -1, 1, b'1', '2021-10-22 09:44:20', '2021-10-22 09:44:20');
INSERT INTO `school_user` VALUES (13, '1234', 1, 'test2', '', '上海', 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fi.qqkou.com%2Fi%2F2a4151978x1080887562b26.jpg&refer=http%3A%2F%2Fi.qqkou.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1641609666&t=6f5946e417e9285f3fd6b0b143448c94', '1213', -1, -1, -1, 1, b'0', '2021-10-22 17:39:09', '2021-12-08 11:39:09');
INSERT INTO `school_user` VALUES (14, '123', 1, '鱼香肉丝没有鱼二号', '', '南昌', 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimage.biaobaiju.com%2Fuploads%2F20180919%2F18%2F1537351370-ckEQxvDZOh.jpg&refer=http%3A%2F%2Fimage.biaobaiju.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1637399493&t=e0e19704cc3848c78ecec15488844d37', '无', -1, -1, -1, 1, b'0', '2021-10-22 17:55:10', '2021-12-08 17:55:10');
COMMIT;

-- ----------------------------
-- Table structure for second_comment
-- ----------------------------
DROP TABLE IF EXISTS `second_comment`;
CREATE TABLE `second_comment` (
  `second_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '二级评论自增id',
  `com_content` varchar(255) NOT NULL COMMENT '二级评论内容',
  `user_id` int(11) DEFAULT NULL COMMENT '评论者用户id',
  `com_user_id` int(11) NOT NULL COMMENT '被评论者用户id',
  `invi_id` int(11) NOT NULL COMMENT '帖子id',
  `agree_num` int(11) NOT NULL DEFAULT '0' COMMENT '评论点赞数',
  `first_id` int(11) NOT NULL COMMENT '一级评论id',
  `com_second_id` int(11) DEFAULT '0' COMMENT '二级评论的id',
  `version` int(11) DEFAULT '0' COMMENT '乐观锁',
  `deleted` bit(1) DEFAULT b'0' COMMENT '逻辑删除',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`second_id`) USING BTREE,
  KEY `SU` (`user_id`) USING BTREE,
  KEY `SCU` (`com_user_id`) USING BTREE,
  KEY `SI` (`invi_id`) USING BTREE,
  KEY `SF` (`first_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of second_comment
-- ----------------------------
BEGIN;
INSERT INTO `second_comment` VALUES (1, '你是谁', 2, 1, 1, 1, 1, 0, 0, b'0', '2021-10-01 11:49:18', '2021-10-01 11:49:21');
INSERT INTO `second_comment` VALUES (2, '我是谁', 1, 2, 1, 0, 1, 1, 0, b'0', '2021-10-01 11:50:31', '2021-10-01 11:50:38');
INSERT INTO `second_comment` VALUES (3, '我不管你你是谁', 2, 1, 1, 0, 1, 2, 0, b'0', '2021-10-01 11:51:46', '2021-10-01 11:51:53');
COMMIT;

-- ----------------------------
-- Table structure for topic
-- ----------------------------
DROP TABLE IF EXISTS `topic`;
CREATE TABLE `topic` (
  `topic_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '话题自增id',
  `topic_name` varchar(255) NOT NULL COMMENT '话题名称',
  `topic_descr` varchar(255) NOT NULL COMMENT '话题描述',
  `invi_num` int(11) NOT NULL DEFAULT '0' COMMENT '帖子数量',
  `topic_icon` varchar(255) DEFAULT NULL COMMENT '话题显示图标',
  `version` int(11) DEFAULT '0' COMMENT '乐观锁',
  `deleted` bit(1) DEFAULT b'0' COMMENT '逻辑删除',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`topic_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of topic
-- ----------------------------
BEGIN;
INSERT INTO `topic` VALUES (1, 'java', 'java一种编程语言', 1, NULL, 0, b'0', '2021-10-01 11:53:28', '2021-10-01 11:53:31');
INSERT INTO `topic` VALUES (2, 'Python', 'Python一种编程语言', 1, NULL, 0, b'0', '2021-10-01 11:54:29', '2021-10-01 11:54:32');
INSERT INTO `topic` VALUES (3, 'C++', 'C++一种编程语言', 1, NULL, 0, b'0', '2021-10-01 11:55:13', '2021-10-01 11:55:16');
COMMIT;

-- ----------------------------
-- Table structure for user_look
-- ----------------------------
DROP TABLE IF EXISTS `user_look`;
CREATE TABLE `user_look` (
  `look_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '浏览记录自增id',
  `invi_id` int(11) NOT NULL COMMENT '浏览的帖子id',
  `state` int(11) NOT NULL DEFAULT '0' COMMENT '浏览（1）或屏蔽（2）状态',
  `agree_status` int(11) NOT NULL COMMENT '点赞状态',
  `user_id` int(11) NOT NULL COMMENT '用户id',
  `version` int(11) DEFAULT '0' COMMENT '乐观锁',
  `deleted` bit(1) DEFAULT b'0' COMMENT '逻辑删除',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`look_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of user_look
-- ----------------------------
BEGIN;
INSERT INTO `user_look` VALUES (1, 1, 1, 1, 1, 1, b'0', '2021-10-12 10:01:47', '2021-10-12 10:22:10');
INSERT INTO `user_look` VALUES (2, 2, 0, 0, 1, 1, b'0', '2021-10-12 10:18:10', '2021-10-13 19:12:23');
INSERT INTO `user_look` VALUES (3, 3, 1, 1, 2, 0, b'0', '2021-10-13 19:00:34', '2021-10-13 19:00:34');
INSERT INTO `user_look` VALUES (4, 3, 2, 1, 2, 0, b'0', '2021-10-13 19:01:04', '2021-10-13 19:01:04');
INSERT INTO `user_look` VALUES (5, 3, 2, 1, 2, 1, b'0', '2021-10-13 19:03:00', '2021-10-15 11:04:45');
INSERT INTO `user_look` VALUES (6, 4, 1, 0, 2, 0, b'0', '2021-10-13 19:16:55', '2021-10-13 19:16:55');
INSERT INTO `user_look` VALUES (7, 3, 1, 1, 1, 0, b'0', '2021-10-15 10:38:36', '2021-10-15 10:57:59');
INSERT INTO `user_look` VALUES (8, 3, 2, 1, 3, 0, b'0', '2021-10-15 11:05:14', '2021-10-15 11:05:14');
INSERT INTO `user_look` VALUES (9, 27, 1, 1, 1, 0, b'0', '2021-10-15 14:34:11', '2021-10-15 16:14:10');
INSERT INTO `user_look` VALUES (10, 28, 2, 1, 1, 0, b'0', '2021-10-16 11:27:07', '2021-10-16 11:44:28');
INSERT INTO `user_look` VALUES (11, 29, 2, 1, 1, 0, b'0', '2021-10-16 11:32:03', '2021-10-16 11:39:41');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
